﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Exceptions
{
    /// <summary>
    /// 异常基类，自定义异常应从此类派生。try时只需catch本类型异常就可以抓住自定义异常
    /// </summary>
    [Obsolete("please use JaredsException instead")]
    public class JaredsAbstractException : JaredsException
    {
        /// <summary>
        /// 异常基类
        /// </summary>
        public JaredsAbstractException() : base() { }
        /// <summary>
        /// 异常基类
        /// </summary>
        /// <param name="msg"></param>
        public JaredsAbstractException(string msg) : base(msg) { }
        /// <summary>
        /// 异常基类
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="ex"></param>
        public JaredsAbstractException(string msg, Exception ex) : base(msg, ex) { }
    }
    /// <summary>
    /// 异常基类，自定义异常应从此类派生。try时只需catch本类型异常就可以抓住自定义异常
    /// </summary>
    public class JaredsException : Exception
    {
        /// <summary>
        /// 异常基类
        /// </summary>
        public JaredsException() : base() { }
        /// <summary>
        /// 异常基类
        /// </summary>
        /// <param name="msg"></param>
        public JaredsException(string msg) : base(msg) { }
        /// <summary>
        /// 异常基类
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="ex"></param>
        public JaredsException(string msg, Exception ex) : base(msg, ex) { }
    }
}
